home *** CD-ROM | disk | FTP | other *** search
/ Immoral Angel 1 / Immoral Angel 1.iso / pc / program / main.dxr / 00031.ls < prev    next >
Encoding:
Text File  |  1997-07-11  |  1.7 KB  |  81 lines

  1. on checksaveronoff n
  2.   clearchecksaver()
  3.   if n = 1 then
  4.     set the hilite of cast "SaverOn" to 1
  5.   else
  6.     if n = 0 then
  7.       set the hilite of cast "SaverOff" to 1
  8.     end if
  9.   end if
  10. end
  11.  
  12. on clearchecksaver
  13.   set the hilite of cast "SaverOn" to 0
  14.   set the hilite of cast "SaverOff" to 0
  15. end
  16.  
  17. on checksavertime n
  18.   clearchecksavertime()
  19.   if n = 2 then
  20.     set the hilite of cast "Saver2min" to 1
  21.   else
  22.     if n = 3 then
  23.       set the hilite of cast "Saver3min" to 1
  24.     else
  25.       if n = 5 then
  26.         set the hilite of cast "Saver5min" to 1
  27.       end if
  28.     end if
  29.   end if
  30. end
  31.  
  32. on clearchecksavertime
  33.   set the hilite of cast "Saver2min" to 0
  34.   set the hilite of cast "Saver3min" to 0
  35.   set the hilite of cast "Saver5min" to 0
  36. end
  37.  
  38. on cancelsaver
  39.   global saveronoff, savertime
  40.   clearchecksaver()
  41.   if saveronoff then
  42.     set the hilite of cast "SaverOn" to 1
  43.   else
  44.     set the hilite of cast "SaverOff" to 1
  45.   end if
  46.   clearchecksavertime()
  47.   if savertime = 2 then
  48.     set the hilite of cast "Saver2min" to 1
  49.   else
  50.     if savertime = 3 then
  51.       set the hilite of cast "Saver3min" to 1
  52.     else
  53.       if savertime = 5 then
  54.         set the hilite of cast "Saver5min" to 1
  55.       end if
  56.     end if
  57.   end if
  58. end
  59.  
  60. on setsaver
  61.   global saveronoff, savertime, fileName
  62.   if the hilite of cast "SaverOn" = 1 then
  63.     set the timeoutScript to "doTimeOut"
  64.     set saveronoff to 1
  65.   end if
  66.   if the hilite of cast "SaverOff" = 1 then
  67.     set the timeoutScript to EMPTY
  68.     set saveronoff to 0
  69.   end if
  70.   if the hilite of cast "Saver2min" = 1 then
  71.     set savertime to 2
  72.   end if
  73.   if the hilite of cast "Saver3min" = 1 then
  74.     set savertime to 3
  75.   end if
  76.   if the hilite of cast "Saver5min" = 1 then
  77.     set savertime to 5
  78.   end if
  79.   set the timeoutLength to savertime * 60 * 60
  80. end
  81.